<?php 
$user = Yii::app()->user;                        
if ($user->id):
    $logedInUser = User::model()->findByPk($user->id);
    echo CHtml::link(t('LBL_LOGOUT'), array('authorization/logout'));
?>
&nbsp;[ <span class="current-user"><?php echo CHtml::encode($logedInUser->first_name. " ". $logedInUser->last_name); ?></span> ]
<span class="sepa">|</span>

<span><b><?php echo t('LBL_ROLE'); ?></b></span> [ <span><?php echo trim($logedInUser->user_role); ?></span> ]
<span class="sepa">|</span>

<?php echo CHtml::link(t('LBL_PROFILE'), array('authorization/profile')); ?>
<span class="sepa">|</span>

<a href="<?php echo url("authorization/changepassword"); ?>" dialog-width="430" dialog-height="250" data-update-dialog-title="<?php echo t('LBL_CHANGE_PASSWORD'); ?>" class="update-dialog-open-link"><?php echo t('LBL_CHANGE_PASSWORD'); ?></a>
<?php else: ?>
<a href="<?php echo url('/authorization/login')?>"><?php echo t('LBL_LOGIN'); ?></a>
<?php endif; ?>
<span class="sepa">|</span>
<a href="<?php echo url('/dashboard/help')?>"><?php echo t('LBL_HELP'); ?></a>
<span class="sepa">|</span>
<a href="<?php echo SITE_URL . '/'; ?>" target="_blank"><?php echo t('LBL_VIEW_SITE'); ?></a>